package com.tian.view.draw.region

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment

/**
 * @author tiansongtao, Email:769001510@qq.com
 * @date 2022/12/29 17:34
 *
 * Region 区域概念， canvas的区域概念
 * 自定义view 的Region 来完成操作。
 *
 */
class RegionFragment : Fragment() {


    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        (requireActivity() as AppCompatActivity).supportActionBar?.title = "Region区域概念"
        val drawView = RegionView(requireContext())
        val lp = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
        drawView.layoutParams = lp
        return drawView
    }

}